#pragma once

class Operation
{
public:
    // 比较优先级
    bool greater(char op1, char op2)
    {
        return getPriority(op1) > getPriority(op2);
    }

private:
    // 获取优先级
    static int getPriority(char op)
    {
        int priority = 0;
        switch (op)
        {
        case '+':
            priority = 1;
            break;
        case '-':
            priority = 1;
            break;
        case '*':
            priority = 2;
            break;
        case '/':
            priority = 2;
            break;
        default:
            break;
        }

        return priority;
    }
};